home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / wssi525b.zip / PSTSCRPT.DEF < prev    next >
Text File  |  1992-02-23  |  5KB  |  96 lines

  1.        Printer definition file for WSSINDEX custom print utility
  2.  
  3. All lines of this file are comments until a line beginning ----.  After that,
  4. alternate lines are comments and parameters.  See the WSSINDEX documentation
  5. for a description of the format allowed here.  The codes in this file are for
  6. a generic postscript printer, but you may alter these to suit your needs.
  7. Some items which you might expect to control in this file, such as font size
  8. and portrait or landscape orientation are instead built into Wssindex.  The
  9. complex commands which do appear in this file relate to disk covers.  They are
  10. made harder to read by the need to represent blank by \s and escape numbers so
  11. that they are interpreted as character.
  12.  
  13. This definition file has been tested using a QMS Jetscript board driving a
  14. Canon engine.
  15.  
  16. Command to advance to next cover, after translation, is
  17.      currentpoint exch pop 396 lt {p}{0 -18 rmoveto}ifelse
  18. This means
  19.   1. stack the x-y coordinates of the current position
  20.   2. exchange the coordinates just stacked
  21.   3. throw away one of them (x)
  22.   4. test if y is less than 396, which is the middle of the page for 11
  23.      inch paper (72 points/inch * 11 inches / 2)
  24.   5. if y is less than 396, more than half the page has been used, so
  25.      execute macro p (defined elsewhere) which starts a new page, otherwise
  26.      move down 18 points (0.25") from the current line
  27. The numbers 396 and 18 might reasonably be adjusted.  If you are trying to
  28. fit more than 2 covers on a page, note that the y coordinate 0 is at the bottom
  29. of the page, so for 3 covers, 396 would be replaced by approximately 264.
  30.  
  31. When the disk cover box forming characters are printed, the fontsize has
  32. already been put on the postscript stack.  Commands here are bracketed by
  33. gsave ... stroke grestore before being sent to the printer, so scaling and
  34. line width adjustments apply only to the box border.  Looking at the top left
  35. hand corner character as a typical example, the translated command is
  36.      dup scale .1 setlinewidth .5 0 rmoveto 0 .5 rlineto 1 0 rlineto
  37. which means
  38.   1. duplicate the fontsize number already stacked and use it as an overall
  39.      scale factor for the lines generating the box.  (x and y can be scaled
  40.      independently, but there's no reason to do that here.)
  41.   2. set the line width to one tenth point (times the font size scale factor)
  42.   3. move to lower middle of character box, draw two lines making up the
  43.      corner of the box.  The box you are drawing is is effectively 1x1 and
  44.      initially the "pen" is at the lower left.
  45. Probably the only thing you might want to change here is the line width.
  46.  
  47. With 90-character wide by 45-character high covers, a font size which works
  48. well is 7 points with 1 point extra spacing.  Enter these numbers on the
  49. postscript printer setup menu in Wssindex.
  50. ------------------------------------------------------------
  51. Printer name
  52. Postscript printer
  53. Optional string printed on all labels
  54. Property of <your name here>
  55. Printer initialization command for 1,2,... column printing, 50 max
  56.  
  57. Printer initialization command for labels, 50 max (pitch, line spacing, etc.)
  58.  
  59. Printer initialization command for disk covers, 50 max
  60.  
  61. Printer deinitialization command, 10 max (form feed for laser printer, etc.)
  62.  
  63. Number of spaces in left margin for labels
  64. 5
  65. Number of columns for labels
  66. 1
  67. Width of labels (characters)
  68. 50
  69. Number of characters between labels (if multiple columns)
  70. 5
  71. Length of label in lines (including unusable lines)
  72. 12
  73. Number of usable lines for label
  74. 9
  75. Number of spaces in left margin for disk covers
  76. 10
  77. Width of paper for disk covers (characters)
  78. 90
  79. Length of page in lines for disk covers
  80. 45
  81. Printer command to position for the next disk cover
  82. currentpoint \s exch \s pop \s \3\9\6 \s lt \s { p } {\0 \s -\1\8 \s rmoveto} ifelse
  83. Character to use for sides of disk cover box (use only "pop" to omit border)
  84. dup \s scale \s .\1 \s setlinewidth \s .\5 \s \0 \s rmoveto \s \0 \s \1 \s rlineto
  85. Character to use for top and bottom lines
  86. dup \s scale \s .\1 \s setlinewidth \s \0 \s .\5 \s rmoveto \s \1 \s \0 \s rlineto
  87. Character to use for top left corner
  88. dup \s scale \s .\1 \s setlinewidth \s .\5 \s \0 \s rmoveto \s \0 \s .\5 \s rlineto \s \1 \s \0 \s rlineto
  89. Character to use for top right corner
  90. dup \s scale \s .\1 \s setlinewidth \s \0 \s .\5 \s rmoveto \s .\5 \s \0 \s rlineto \s \0 \s -.\5 \s rlineto
  91. Character to use for bottom left corner
  92. dup \s scale \s .\1 \s setlinewidth \s .\5 \s \1 \s rmoveto \s \0 \s -.\5 \s rlineto \s .\5 \s \0 \s rlineto
  93. Character to use for bottom right corner
  94. dup \s scale \s .\1 \s setlinewidth \s \0 \s .\5 \s rmoveto \s .\5 \s \0 \s rlineto \s \0 \s .\5 \s rlineto
  95. End of printer configuration file
  96.